package base;

import android.support.v4.view.PagerAdapter;
import android.view.View;
import android.view.ViewGroup;


/**
 * by BF00233 on 2018/2/7.
 */

public class BasePagerAdapter extends PagerAdapter {

    private int mCount;


    public BasePagerAdapter(int count) {
        mCount = count;
    }

    @Override
    public int getCount() {
        return mCount;
    }

    @Override
    public boolean isViewFromObject(View view, Object object) {
        return view == object;
    }

    @Override
    public void destroyItem(ViewGroup container, int position, Object object) {
        container.removeView((View) object);
    }
}
